package com.bdqn.zhang.service;

import com.bdqn.zhang.dao.RealEstateDao;
import com.bdqn.zhang.entity.RealEstate;

import java.util.List;

/**
 * Created by 任 on 2019/4/11.
 */
public class RealEstateServiceImpl implements RealEstateService{

    private RealEstateDao realEstateDao;
    public void setRealEstateDao(RealEstateDao realEstateDao) {
        this.realEstateDao = realEstateDao;
    }

    @Override
    public List<RealEstate> findByestate(RealEstate estate) {

        return realEstateDao.findByestate(estate);
    }

    @Override
    public List<RealEstate> findAllRealEstate(Integer page, Integer limit) {
        List<RealEstate> realEstateList = null;
        try {
            realEstateList = realEstateDao.findAllRealEstate(page,limit);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return realEstateList;
    }

    @Override
    public boolean delRealEstate(RealEstate realEstate) {
        return realEstateDao.delRealEstate(realEstate);
    }

    @Override
    public boolean updRealEstate(RealEstate realEstate) {
        return realEstateDao.updRealEstate(realEstate);
    }

    @Override
    public boolean addRealEstate(RealEstate realEstate) {
        return realEstateDao.addRealEstate(realEstate);
    }


}
